package com.example.register.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;

@CrossOrigin
@Controller
public class PublicUtilController {
    @GetMapping("/reg")
    public String reg_html(ModelMap map) {
        // 加入一个属性，用来在模板中读取
        map.addAttribute("host", "登录页面");

        // return模板文件的名称，对应src/main/resources/templates/login_hm.html
        return "register";
    }
}
